package practice.string;

public class Test {

    public static void main(String[] args) {

//        int count =0;
//        for (int i = 1; i <= 100; i++) {
//            if (i%3==0 || (i+"").contains("3")){
//                System.out.print(i+" ");
//                count ++;
//                if (count%7==0){
//                    System.out.println();
//                }
//            }
//        }

        //String类重写了equals方法，把比较引用地址改成了比较值
        String a = "1234";
        String b = a;
        String c = "12"+"34";
        String d = new String("1234");
        System.out.println(a==b);         //true
        System.out.println(a==c);         //true
        System.out.println(a==d);         //false
        System.out.println(a.equals(d));  //true
        System.out.println(Math.round(1.5));
        System.out.println(Math.round(2.1));
        System.out.println(Math.round(-1.5));
    }
    public static int show(){
        return 4;
    }
}
